Skip to content

doc: add test reporter event lifecycle diagram - #63780

Open
Han5991 wants to merge 2 commits into
nodejs:mainfrom
Han5991:doc/test-reporter-events-lifecycle
Open

doc: add test reporter event lifecycle diagram#63780
Han5991 wants to merge 2 commits into
nodejs:mainfrom
Han5991:doc/test-reporter-events-lifecycle

Conversation

@Han5991

@Han5991 Han5991 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Adds an "Event lifecycle" section under Class: TestsStream with an ASCII diagram showing how reporter events relate: declaration-order events vs their execution-order twins (test:dequeue / test:complete), the leaf vs suite flow, and the run-level finale.

image image

Fixes: #51908

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem. labels Jun 7, 2026
Comment thread doc/api/test.md Outdated
@atlowChemi

Copy link
Copy Markdown
Member

Ping @MoLow
You recently fixed some bugs around the order of the events, can you also have a look?

@Gasila5

This comment was marked as spam.

Gasila5

This comment was marked as spam.

@trivikr

trivikr commented Aug 22, 2026

Copy link
Copy Markdown
Member

This needs a rebase to resolve conflicts in doc/api/test.md

Document the lifecycle of node:test reporter events under
Class: TestsStream, with an ASCII diagram that distinguishes
declaration-order events from their execution-order twins
(test:dequeue/test:complete), the leaf vs suite flow, and the
run-level finale.

Fixes: nodejs#51908
Signed-off-by: sangwook <rewq5991@gmail.com>
@Han5991
Han5991 force-pushed the doc/test-reporter-events-lifecycle branch from bddf765 to 6763fea Compare August 24, 2026 11:24
@Han5991

Han5991 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@atlowChemi

I pushed to resolve the issue, so please approve it again.

@trivikr
trivikr requested a review from atlowChemi August 24, 2026 17:54

@atlowChemi atlowChemi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Han5991 this mostly LGTM. Should this also mention test:interrupted?

@Han5991

Han5991 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@Han5991 this mostly LGTM. Should this also mention test:interrupted?

@atlowChemi
It would be good to add that! I've added it.

@atlowChemi atlowChemi added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Aug 26, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Aug 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

   ⚠  Found Fixes: https://github.com/nodejs/node/issues/51908, skipping..
     ⚠  0:50     Title should be <= 50 columns.            title-length

The pull request was removed from the Commit Queue and labeled commit-queue-failed An error occurred while landing this pull request using GitHub Actions. . After resolving the failure, remove that label and add commit-queue Add this label to land a pull request using GitHub Actions. to retry.

Full Commit Queue output
- Loading data for nodejs/node/pull/63780
βœ”  Done loading data for nodejs/node/pull/63780
----------------------------------- PR info ------------------------------------
Title      doc: add test reporter event lifecycle diagram (#63780)
Author     sangwook <rewq5991@gmail.com> (@Han5991)
Branch     Han5991:doc/test-reporter-events-lifecycle -> nodejs:main
Labels     doc, commit-queue, commit-queue-rebase, test_runner
Commits    3
 - doc: add test reporter event lifecycle diagram
 - doc: mention test:interrupted in event lifecycle diagram
 - doc: re-trigger CI
Committers 1
 - sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63780
Fixes: https://github.com/nodejs/node/issues/51908
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/63780
Fixes: https://github.com/nodejs/node/issues/51908
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Sun, 07 Jun 2026 02:36:35 GMT
   βœ”  Approvals: 1
   βœ”  - Chemi Atlow (@atlowChemi): https://github.com/nodejs/node/pull/63780#pullrequestreview-5030340192
   βœ”  Last GitHub CI successful
   β„Ή  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   βœ”  No git cherry-pick in progress
   βœ”  No git am in progress
   βœ”  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
βœ”  origin/main is now up-to-date
- Downloading patch for 63780
From https://github.com/nodejs/node
 * branch                  refs/pull/63780/merge -> FETCH_HEAD
βœ”  Fetched commits as 7b6b21a8aaea..8577f352d40a
--------------------------------------------------------------------------------
[main abcc22466c] doc: add test reporter event lifecycle diagram
 Author: sangwook <rewq5991@gmail.com>
 Date: Sun Jun 7 11:35:37 2026 +0900
 1 file changed, 59 insertions(+)
[main dd00d989a2] doc: mention test:interrupted in event lifecycle diagram
 Author: sangwook <rewq5991@gmail.com>
 Date: Tue Aug 25 20:42:36 2026 +0900
 1 file changed, 9 insertions(+)
[main 8d2117c630] doc: re-trigger CI
 Author: sangwook <rewq5991@gmail.com>
 Date: Tue Aug 25 22:42:49 2026 +0900
   βœ”  Patches applied
There are 3 commits in the PR. Attempting autorebase.
(node:422) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/4)
Executing: git node land --amend --yes
   ⚠  Found Fixes: https://github.com/nodejs/node/issues/51908, skipping..
--------------------------------- New Message ----------------------------------
doc: add test reporter event lifecycle diagram

Document the lifecycle of node:test reporter events under
Class: TestsStream, with an ASCII diagram that distinguishes
declaration-order events from their execution-order twins
(test:dequeue/test:complete), the leaf vs suite flow, and the
run-level finale.

Fixes: https://github.com/nodejs/node/issues/51908
Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63780
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
--------------------------------------------------------------------------------
[detached HEAD 814dae8e17] doc: add test reporter event lifecycle diagram
 Author: sangwook <rewq5991@gmail.com>
 Date: Sun Jun 7 11:35:37 2026 +0900
 1 file changed, 59 insertions(+)
Rebasing (3/4)
Rebasing (4/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
doc: mention test:interrupted in event lifecycle diagram

The diagram only covered the normal path, ending at test:summary. Add an
INTERRUPTION branch so the abnormal path is covered too: on SIGINT the run
exits before the buffered declaration ordered events are flushed, so neither
the run level finale nor the interrupted tests' own results are emitted.

Signed-off-by: sangwook <rewq5991@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63780
Fixes: https://github.com/nodejs/node/issues/51908
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
--------------------------------------------------------------------------------
[detached HEAD e6f3f4c758] doc: mention test:interrupted in event lifecycle diagram
 Author: sangwook <rewq5991@gmail.com>
 Date: Tue Aug 25 20:42:36 2026 +0900
 1 file changed, 9 insertions(+)
Successfully rebased and updated refs/heads/main.
--------------------------------------------------------------------------------
  βœ”  814dae8e176aa54b77d4a779e9c12e38d454a1c0
     βœ”  0:0      no Assisted-by metadata                   assisted-by-is-trailer
     βœ”  0:0      no Co-authored-by metadata                co-authored-by-is-trailer
     βœ”  7:7      Valid fixes URL.                          fixes-url
     βœ”  0:0      blank line after title                    line-after-title
     βœ”  0:0      line-lengths are valid                    line-length
     βœ”  0:0      metadata is at end of message             metadata-end
     βœ”  9:8      PR-URL is valid.                          pr-url
     βœ”  0:0      reviewers are valid                       reviewers
     βœ”  0:0      has valid Signed-off-by                   signed-off-by
     βœ”  0:0      valid subsystems                          subsystem
     βœ”  0:0      Title is formatted correctly.             title-format
     βœ”  0:0      Title is <= 50 columns.                   title-length
  βœ–  e6f3f4c7588ed1f5f3713ca96279cae58448715c
     βœ”  0:0      no Assisted-by metadata                   assisted-by-is-trailer
     βœ”  0:0      no Co-authored-by metadata                co-authored-by-is-trailer
     βœ”  8:7      Valid fixes URL.                          fixes-url
     βœ”  0:0      blank line after title                    line-after-title
     βœ–  7:72     Line should be <= 72 columns.             line-length
     βœ–  8:72     Line should be <= 72 columns.             line-length
     βœ”  0:0      metadata is at end of message             metadata-end
     βœ”  7:8      PR-URL is valid.                          pr-url
     βœ”  0:0      reviewers are valid                       reviewers
     βœ”  0:0      has valid Signed-off-by                   signed-off-by
     βœ”  0:0      valid subsystems                          subsystem
     βœ”  0:0      Title is formatted correctly.             title-format
     ⚠  0:50     Title should be <= 50 columns.            title-length
   β„Ή  Please fix the commit message and try again.
Please manually ammend the commit message, by running
`git commit --amend`
Once commit message is fixed, finish the landing command running
`git node land --continue`

View workflow run

The diagram only covered the normal path, ending at
test:summary. Add an INTERRUPTION branch: on SIGINT the
run exits before the buffered declaration-ordered events
are flushed, so neither the run-level finale nor the
interrupted tests' own results are emitted.

Signed-off-by: sangwook <rewq5991@gmail.com>
@Han5991
Han5991 force-pushed the doc/test-reporter-events-lifecycle branch from 8577f35 to d460d29 Compare August 26, 2026 12:59
@Han5991

Han5991 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

@atlowChemi

A "commit-queue-failed" error occurred, so I have updated the commit message. Please approve and merge.

@panva panva added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test reporter events lifecycle diagram to the docs

6 participants